package com.guet.careapp.pojo;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "t_service_housekeeping_info", schema = "careapp", catalog = "")
public class TServiceHousekeepingInfoEntity {
    private int id;
    private String servantName;
    private String servantImg;
    private String phone;
    private String servicePrice;
    private String serviceName;
    private String serviceWay;
    private String serviceRange;
    private String serviceTitle;
    private String serviceContent;
    private Long createTime;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "servant_name", nullable = true, length = 20)
    public String getServantName() {
        return servantName;
    }

    public void setServantName(String servantName) {
        this.servantName = servantName;
    }

    @Basic
    @Column(name = "servant_img", nullable = true, length = 512)
    public String getServantImg() {
        return servantImg;
    }

    public void setServantImg(String servantImg) {
        this.servantImg = servantImg;
    }

    @Basic
    @Column(name = "phone", nullable = true, length = 20)
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "service_price", nullable = true, length = 128)
    public String getServicePrice() {
        return servicePrice;
    }

    public void setServicePrice(String servicePrice) {
        this.servicePrice = servicePrice;
    }

    @Basic
    @Column(name = "service_name", nullable = true, length = 128)
    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    @Basic
    @Column(name = "service_way", nullable = true, length = 128)
    public String getServiceWay() {
        return serviceWay;
    }

    public void setServiceWay(String serviceWay) {
        this.serviceWay = serviceWay;
    }

    @Basic
    @Column(name = "service_range", nullable = true, length = 512)
    public String getServiceRange() {
        return serviceRange;
    }

    public void setServiceRange(String serviceRange) {
        this.serviceRange = serviceRange;
    }

    @Basic
    @Column(name = "service_title", nullable = true, length = 512)
    public String getServiceTitle() {
        return serviceTitle;
    }

    public void setServiceTitle(String serviceTitle) {
        this.serviceTitle = serviceTitle;
    }

    @Basic
    @Column(name = "service_content", nullable = true, length = 8192)
    public String getServiceContent() {
        return serviceContent;
    }

    public void setServiceContent(String serviceContent) {
        this.serviceContent = serviceContent;
    }

    @Basic
    @Column(name = "create_time", nullable = true)
    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TServiceHousekeepingInfoEntity that = (TServiceHousekeepingInfoEntity) o;
        return id == that.id &&
                Objects.equals(servantName, that.servantName) &&
                Objects.equals(servantImg, that.servantImg) &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(servicePrice, that.servicePrice) &&
                Objects.equals(serviceName, that.serviceName) &&
                Objects.equals(serviceWay, that.serviceWay) &&
                Objects.equals(serviceRange, that.serviceRange) &&
                Objects.equals(serviceTitle, that.serviceTitle) &&
                Objects.equals(serviceContent, that.serviceContent) &&
                Objects.equals(createTime, that.createTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, servantName, servantImg, phone, servicePrice, serviceName, serviceWay, serviceRange, serviceTitle, serviceContent, createTime);
    }
}
